package cloudnative.demo.labclient.client;


import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import cloudnative.demo.labclient.model.Laboratory;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@FeignClient(name="lab-service")
public interface LabServiceClient {



    // 查询所有实验室信息
    @GetMapping("/laboratory/queryAll")
    List<Laboratory> queryAllLaboratories();

    // 通过WorkerID查询实验室信息
    @PostMapping("/laboratory/queryML")
    List<Laboratory> queryLaboratoriesByWorkerID(@RequestBody Laboratory laboratory);

    // 添加实验室
    @PostMapping("/laboratory/addL")
    void addLaboratory(@RequestBody Laboratory laboratory) ;

    // 删除实验室
    @PostMapping("/laboratory/deleteL")
    void deleteLaboratory(@RequestBody Laboratory laboratory) ;

    // 更新实验室信息
    @PostMapping("/laboratory/alterL")
    void updateLaboratory(@RequestBody Laboratory laboratory) ;

}
